<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title>全局</title>
    </head>
    <body>

        <script type="text/javascript">
            // 在 浏览器 环境中可以通过 window 来访问 "全局"
            console.log( window ); // "全局"
            console.log( globalThis ); // "全局"
            console.log( globalThis === window );
        </script>
        
    </body>
</html>